<script src="vue/vue-2.6.11.js"></script>
<script src="vue/axios-0.19.2.min.js"></script>
<script src="vue/layer.js"></script>
<script>
    vm = new Vue({
        el: '#app',  //选中整个main
        methods: {
          getUserInfo:function () {
              axios.get('user/getUserInfo').then(rs=>{
                  let user = rs.data.obj;
                  sessionStorage.setItem("user", JSON.stringify(user));
                  sessionStorage.setItem("showNum", 5);
                  sessionStorage.setItem("typeId",0);
                  location.href = 'home.html';
              }).catch(e=>{
                  layer.msg(e.message);
              })
          }
        },
        created: function () {
           this.getUserInfo();
        }
    });
</script>